package models;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.OneToOne;

import play.data.validation.Min;
import play.data.validation.Required;
import play.db.jpa.Model;

/**
 * The address entity class. This is being re-used both for maintaining user
 * address as well as deal address
 * 
 */
@Entity
public class Address extends Model {

	@Required(message = "validation.address.street")
	public String street;

	@Required(message = "validation.address.houseNum")
	public String houseNumber;

	@Required(message = "validation.address.zipCode")
	public String zipCode;

	@Required(message = "validation.address.city")
	public String city;

	public double latitude;
	public double longitude;

	public Address(String street, String houseNumber, String zipCode,
			String city) {
		this.street = street;
		this.houseNumber = houseNumber;
		this.zipCode = zipCode;
		this.city = city;
	}

	public Address() {
	}

}